﻿@model IEnumerable<CID.Domain.Operations.Environment>

@{
    ViewBag.Title = "Environments States' Index";
    AjaxOptions ajaxOptions = new AjaxOptions()
    {
        LoadingElementId = "LoadingPane",
        UpdateTargetId = "ContentPane",
        HttpMethod ="GET",
    };
}

<script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
<h2>Environments States</h2>
<div style="min-height:200px">
    <div style="float:left; margin-right:10px; height:100%">
        <ul style="list-style:none; margin:0px; padding:0px">
        @foreach (var environment in Model)
        {
            <li>@Ajax.ActionLink(environment.Name, "EnvironmentStateDetails", new { id = environment.Id }, ajaxOptions)</li>
        }
        </ul>
    </div>
    <div>
        <div id="LoadingPane"style="display:none; color:Red; font-weight: bold">loading...</div>
        <div id="ContentPane"></div>
    </div>
</div>